﻿namespace Pay.DTO
{
    /// <summary>
    /// 支付/退款通知
    /// </summary>
    public class NotifyResultDto
    {
        /// <summary>
        /// 是否支付/退款成功
        /// </summary>
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 通知类型：Pay->支付通知; Refund->退款通知
        /// </summary>
        public string NotifyType { get; set; } = "Pay";

        /// <summary>
		/// 应用appId
		/// </summary>
		public string AppId { get; set; }

        /// <summary>
        /// 支付/退款类型
        /// </summary>
        public PayCategoryEnum? PayCategory { get; set; }

        /// <summary>
        /// 支付/退款渠道
        /// </summary>
        public PaySourceEnum? PaySource { get; set; }

        /// <summary>
        /// 商户订单号
        /// </summary>
        public string OutTradeNo { get; set; }

        /// <summary>
        /// 商户退款单号
        /// </summary>
        public string RefundNo { get; set; }

        /// <summary>
        /// 第三方支付单号
        /// </summary>
        public string PayId { get; set; }

        /// <summary>
        /// 第三方退款单号,可能为空
        /// </summary>
        public string RefundId { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        public string Attach { get; set; }

        /// <summary>
        /// 支付金额(元),两位小数
        /// </summary>
        public decimal Amount { get; set; }

        /// <summary>
        /// 退款金额(元),两位小数
        /// </summary>
        public decimal RefundAmount { get; set; }

        /// <summary>
        /// 原始数据
        /// </summary>
        public object OrginalData { get; set; }

        /// <summary>
        /// 解析异常信息
        /// </summary>
        public string Exception { get; set; }
    }
}
